/**
 * VUEshop
 * ============================================================================
 * * 版权所有 2015-2027 深圳搜豹网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.vueshop.com.cn
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
 * 不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
 * $Author: 沈小白 2020-07-22 $
 */<template> 
	<view>
		<view class="container" v-if="treamInfo">
			<view class="type-navbar">
				<block v-for="(item,index) in categories" :key="index">
					<view class="type-box">
						<view @tap="tabClick" class="type-navbar-item" :class="[activeCategoryId==item.id?'type-item-on':'']" :data-id="item.id">{{item.name}}</view>
					</view>
				</block>


				<view catchtap="catchShare" class="share-btn" v-if="ishide">
					<image :src="imgUrl+'/common/icon-share.png'" role="img"></image>
				</view>
			</view>
			<view class="goods-detail">
				<view class="goods-info" :hidden="activeCategoryId ==0?false:true">
					<swiper class="swiper_box" :indicator-dots="true" :vertical="false" :autoplay="true" :interval="3000" :duration="1000">
						<block v-if="goods_img.length!=0">
							<swiper-item v-for="(item,index) in goods_img" :key="index"> 
								<image class="wh100" v-if="goods_img&&item.image_url" :src="item.image_url.indexOf('public')==1?hostUrl+item.image_url:item.image_url" />

							</swiper-item>
						</block>
						<block  v-if="goods_img.length==0">
							<swiper-item>
								<image class="wh100"  :src="goodsInfo.original_img.indexOf('public')==1?hostUrl+goodsInfo.original_img:goodsInfo.original_img" />
							</swiper-item>
						</block>
					</swiper>
					<view class="pt-goods">
						<view class="pt-goods-name ellipsis-1">{{treamInfo.goods_name}}</view>
						<view class="pt-tips">
							<view class="co-red" v-if="skuInfo.shop_price">￥{{skuInfo.shop_price.toFixed(2)}}</view>
							<view class="pt-btn">拼团中</view>
						</view>
						<view class="pt-price">
							市场价格：
							<text>
								￥{{skuInfo?skuInfo.market_price:goodsInfo.market_price}}
							</text>
						</view>
						<view class="pt-des"> {{treamInfo.act_name}}</view>
						<view class="pt-icos">
							<view>
								<image :src="imgUrl+'common/ico-pt1.png'" role="img"></image>
								品质保障
							</view>
							<view>
								<image :src="imgUrl+'common/ico-pt2.png'" role="img"></image>
								放心物流
							</view>
							<view>
								<image :src="imgUrl+'common/ico-pt3.png'" role="img"></image>
								贴心服务
							</view>
						</view>
					</view>
					<block v-if="teamResult.length > 0">
						<view class="pt-order-tips">以下小伙伴正在发起团购，您可以直接参与</view>
						<view v-for="(item,index) in teamResult" :key="index" v-if="index<2"   class="pt-order-list">
						<view class="just flex" v-if="index == 0">
									<view class="pt-order-tips">{{total}}人在拼单</view>
									<view class="pt-order-tips more" @tap.stop='catmore'>查看更多</view>
								</view>
							<view class="pt-order-item">
								<view class="pt-order-cont">
									<view class="pt-user">
										<image class="ellipsis-1 co-333" :src='item.head_pic ? item.head_pic:defaultImg'></image>
										<view class="ellipsis-1 name">{{item.nickname&&item.nickname!='' ? item.nickname:'用户' + item.user_id}}</view>
									</view>
									<view class="pt-time">
										<view class="ellipsis-1 co-red">还差{{item.surplus}}人成团</view>
										<view class="ellipsis-1">{{endTime[index]}}后结束</view>
									</view>
								</view>
								<navigator class="pt-order-btn" :url="'/pages/team/team_detail/team_detail?foundId='+item.found_id">去拼单</navigator>
							</view>
			   
						</view>
					</block>
					<view class="pt-store" hidden>
						<view class="pt-store-des">
							<image :src="hostUrl+stroeInfo.store_logo" role="img"></image>
							<view class="pt-store-cont">
								<view class="co-333 ellipsis-1">{{stroeInfo.store_name}}</view>
								<view>销量：{{goodsInfo.show_sale_sum}}</view>
							</view>
						</view>
						<navigator :url="'/pages/store/index/index?store_id='+treamInfo.store_id" role="navigation">
							<image :src="imgUrl+'common/shop-ico.jpg'" role="img"></image>
							进店逛逛
						</navigator>
					</view>
					<view class="pt-rule">
						<view class="pt-rule-name">拼团规则</view>
						<view class="pt-rule-list">
							<view>
								<view class="pt-rule-num">1</view>
								<view>选择商品</view>
							</view>
							<view>
								<view class="pt-rule-num">2</view>
								<view>开团/参团</view>
							</view>
							<view>
								<view class="pt-rule-num">3</view>
								<view>邀请好友</view>
							</view>
							<view>
								<view class="pt-rule-num">4</view>
								<view>人满成团</view>
							</view>
						</view>
						<view @tap="showRule" class="pt-ico5 " :class="rule?'':'transform'">
							<image :src="imgUrl+'common/ico-pt4.png'" role="img"></image>
						</view>
						<view class="pt-rule-cont" :hidden="rule">
							<view>1.开团：在商城内选择喜欢的商品，点击“去开团”，付款成功后即为开团成功；</view>
							<view>2.参团：进入朋友分享的页面，点击“立即参团”，付款后即为参团成功，若多人同时支付，按先支付成功的用户获得参团资格；</view>
							<view>3.成团：在开团或参团之后,可以点击“分享出去”，在有效时间凑齐成团人数即拼团成功；</view>
							<view>4.组团失败：在有效时间内未凑齐人数，即为组团失败，此时商城会将原款分别退回；</view>
						</view>
					</view>
					<view @tap="tabComment" class="user-comment logistics-item pd-bg-fff">
						<view>用户评论</view>
						<view class="good-comment" v-if="commentData">
							好评率
							<view class="co-red"> {{commentData.high_rate}}%</view>
						</view>
						<view class="comment-num">
							<view class="co-red">{{commentData.total_sum}}</view>
							人评价
							<view class="item-img">
								<image class="wh100" :src="imgUrl+'common/icon-arrowdown.png'" role="img"> </image>
							</view>
						</view>
					</view>
				</view>
				<view class="goods-norms" :hidden="activeCategoryId !=2?false:true">
					<view class="type-navbar2">
						<view class="type-box2">
							<view @tap="tabClick2" :class="[activeNormsId==0?'type-item2-on':'']" data-id="0"> 商品详情 </view>
						</view>
						<view class="type-box2">
							<view @tap="tabClick2" :class="[activeNormsId==1?'type-item2-on':'']" data-id="1"> 规格参数 </view>
						</view>
					</view>
					<view class="wxParse" :hidden="activeNormsId==0?false:true">
						<rich-text :nodes="goodsInfo.goods_content"> </rich-text>
					</view>
					<view class="parameter" :hidden="activeNormsId==1?false:true">
						<view class="table" v-if="goodsAttr">
							<view class="th-thitle tb">主体</view>
							<block v-for="(item,index) in goodsAttr" :key="index">
								<view class="td-cont tb">
									<view class="td-title">{{item.goods_attribute.attr_name}}</view>
									<view class="td-text">{{item.attr_value}}</view>
								</view>
							</block>
						</view>
					</view>
				</view>
				<!-- 评论 -->
				<view class="goods-comment" :hidden="activeCategoryId ==2?false:true">
					<view class="type-navbar3">
						<block v-for="(item,index) in categories3">
							<view class="type-box3">
								<view @tap="tabClick3" :class="[commentsType==item.id?'type-item3-on':'']" :data-id="item.id">{{item.name}}({{item.num}})
								</view>
							</view>
						</block>
					</view>
					<view class="comment-list"  v-if="allComments!=''||allComments.length>0">
						<block v-for="(item,n) in allComments" :key="n">
							<view class="comment-item">
								<view class="comment-title">
									<view class="user-name">
										<view class="user-pic">
											<!-- #ifdef H5 -->
												<image class="wh100" :src="item.is_anonymous===1?defaultImg:hostUrl+item.head_pic" role="img"></image>
											<!-- #endif -->
											<!-- #ifndef H5 -->
											<image class="wh100" :src="item.is_anonymous===1?defaultImg:item.head_pic" role="img"></image>
											<!-- #endif -->
											
										</view>
										{{item.is_anonymous===1 ? '匿名用户' : item.nickname ||item.nickname?item.nickname:'匿名用户'}}
									</view>
									<view>{{item.add_time_format}}</view>
								</view>
								<view class="comment-cont">
									<view>
										<view class="stars">
											<view class="stars-checked">

												<image class="star" v-for="item in item.goods_rank" :src="imgUrl+'common/star-red.png'" role="img"></image>

											</view>
											<view class="stars-unchecked">
												<image class="star" v-for="item in 5 - item.goods_rank" :src="imgUrl+'common/star-gray.png'" role="img"></image>
											</view>
										</view>
										<view class="state-spec ellipsis-1"></view>
									</view>
									<view class="comment-mes">{{item.content}}</view>
									<view class="img-ul" v-if="item.commentsImg!='' ||item.commentsImg">
										<block v-for="(item1,pic) in item.commentsImg" :key="pic">
											<view class="img-li">
												<!-- <image mode='aspectFill' ></image> -->
													<image @tap="previewCommentImgs" class="wh100" :data-cidx="item.comment_id" :data-index="pic" role="img" :src="hostUrl+item1"></image>
											</view>
										</block>
									</view>
								</view>
							</view>
						</block>

					</view>
					<text class="nodata" v-if="noData">没有数据了~~</text>
				</view>
			</view>
		</view>
		<view @tap="doScrollTop" class="toTop">
			<image class="wh100" :src="imgUrl+'common/topup.png'" role="img"> </image>
		</view>
		<view class="join-cart">
			<navigator  class="custom-service cart-ico" url="../../index/index" open-type="switchTab" role="navigation">
				<image class="cs-img cs-img-kf" :src="imgUrl+'common/index-6.png'" role="img"></image>
				<view>首页</view>
			</navigator>
			<view @tap="contactService" class="custom-service cart-ico">
				<view class="cs-button">
					<image class="cs-img cs-img-kf" :src="imgUrl+'common/custom-service.png'" role="img">
					</image>
					<view class="cs-ing-name">客服</view>
				</view>
			</view>
			<view @tap="collectGoods" class="custom-service cart-ico">
				<image class="cs-img" v-if="collectActive" :src="imgUrl+'common/heart.png'" role="img"></image>
				<image class="cs-img" v-if="!collectActive" :src="imgUrl+'common/heart-h.png'" role="img"></image>
				</image>
				<view>收藏</view>
			</view>
			<view @tap="buyNormal" class="join-btn cart-btn" v-if="goodsInfo">
				<view class="classname">单独购买</view>
				
				<view class="classname">￥{{goodsInfo.market_price}}</view>
			</view>
			<view @tap="openSpecModel" class="buy-btn cart-btn" v-if="treamInfo">
				<view class="classname">{{treamInfo.needer}}人团</view>
				<view class="classname" v-if="skuInfo||goodsInfo">￥{{skuInfo?skuInfo.shop_price:goodsInfo.shop_price}}</view>
			</view>
		</view>
		<!-- 规格弹框  -->
		<view :hidden="openSpecModalActive">
		    <view class="cover-layer" @tap="closeSpecModal"></view>
		    <view class="spec-model">
		     <closeicon @click="closeSpecModal" class="modal-close" color="gray" size="22" type="close" role="img"></closeicon>
		       <view class="spec-goods">
		            <image class="wh100 spec-img" v-if="goodsInfo.original_img" :src="goodsInfo.original_img.indexOf('public')==1?hostUrl+goodsInfo.original_img:goodsInfo.original_img"></image>
		            <view class="spec-goods-info">
		                <view class="spec-goods-name">{{goodsInfo.goods_name}}</view>
		                <view  class="spec-goods-price">￥
						
						{{skuInfo?skuInfo.shop_price:goodsInfo.shop_price}}
						({{treamInfo.needer}}人团) </view>
		                <!-- <view class="spec-goods-price">￥{{skuInfo?skuInfo.cost_price:goodsInfo.market_price}} </view> -->
		                <view class="spec-goods-stock">剩余库存：{{skuInfo?skuInfo.store_count:goodsInfo.store_count}}</view>
		            </view>
		        </view>
		        <view class="spec-name">数量</view>
		       <view class="count">
		       	<view @tap="subCartNum" class="sub">-</view>
		       	<input @blur="inputCartNum" v-model="goodsInputNum" type="number"  >
		       	</input>
		       	<view @tap="addCartNum" class="add">+</view>
		       </view>
			   <view class="spec-box">
		        <block v-for="(item,n) in specification" :key="n">
		        	<view>
						<view class="spec-name">{{item.name}}</view>
						<block v-for="(item,index) in item.spec_item_list" :key="index">
							
							<view @tap="selectSpec(item.id,n,$event,index)" class="spec-btn " :class="[subIndex[n]==index?'spec-btn-click':'']"  :data-id="item.id" :data-index="n" >{{item.item}}</view>
						</block>
					</view>
		        	
		        </block>
				</view>
		        <view class="spec-cart-btn " :class="[skuInfo.prom_id<=0||skuInfo.store_count<=0 ? 'spec-cart-disable':'']" @tap="buyNow">发起拼团</view>
		    </view>
		</view>
		<!-- 拼单弹窗 -->
		<view class='modal-mask' v-if='modalMask' >
		    <view class='modal-content'>
		      <view class='modal-title'>正在拼单</view>
		      <view @tap='clickMask' class='modal-close'>
		        <image :src="imgUrl+'common/close.png'"></image>
		      </view>
		      <view class='modal-list'>
		    <block v-if="teamResult.length > 0" > 
		        <view class='modal-list-content' v-for="(item,index) in teamResult" :key="index" v-if="index<10">
		          <view class='modal-image'>
		              <image :src="item.head_pic&&item.head_pic!=''?item.head_pic:defaultImg"></image>
		              <view class='modal-info'>
		             <view class='modal-person'><text>{{item.nickname&&item.nickname!='' ? item.nickname:'用户' + item.user_id}}</text><text>还差{{item.surplus}}人</text></view>
		              <view class='modal-time'>剩余{{endTime[index]}}</view>
		          </view>
		          </view>
		          <navigator class="modal-btn" @tap="clickMask" :url="'/pages/team/team_detail/team_detail?foundId='+item.found_id">去拼单</navigator>   
		          <view class='max' v-if="index==9">仅显示10个正在拼单的人</view>     
		        </view>
		    </block>
		      </view>
		    </view>
		  </view>
	</view>
</template>

<script>
	const configInfo=getApp().globalData.configInfo; //从app.vue获取配置信息
	import closeicon from "@/components/uni-icons/uni-icons.vue";
	import config from "@/api/config.js";
	import common from "@/common/common.js";
	import {
		getComments,
		getTreamInfo,
		getGoodsImg,
		getGoodsInfo,
		getStore,
		getGoodsAttr,
		getCommentStatistics,
		getGoodsFocus,
		delGoodsFocus,
		postGoodsFocus,
		getTreamFound,
		getPrice,
		getSku,
		getSpecification,
		postTreamOrder,
		getSystemTime,
		postVisit
	} from "@/api/api.js";
	import {mapState} from 'vuex';
	export default {
		data() {
			return {
				hostUrl: config.host,
				imgUrl:config.imgUrl,
				ishide: false,
				activeCategoryId: 0, //商品主业
				activeNormsId: 0, // 0默认选中商品详情
				commentsType: 1, //评论type 默认1
				allComments: [], //全部评论
				noData: false,
				modalMask:false,//拼团弹窗
				goodsInputNum:1,//选中的商品数
				commentData: "", //评价信息
				itemId:"",//sku中的item_id
				startTime:"",//拼团开始时间
				 subIndex: [], //是否选中 因为不确定是多规格还是但规格，所以这里定义数组来判断
				defaultImg: config.imgUrl+"common/user68.jpg",//默认匿名图片
				openSpecModalActive: true, //是否打开规格弹窗
				treamInfo: "", //拼团商品信息
				goods_img: [], //商品图片
				stroeInfo: "", //店铺信息
				specification:"",//规格
				goodsInfo: "", //商品信息
				goodsAttr: [], //商品规格参数
				selectArr:[],//存放被选中的值
				prom_type:"",//判断是否有活动
				collectActive: true, //未收藏
				goods_id:"",//商品id
				size: 4, //评论接口返回8条
				teamResult:[],//拼团list
				skuInfo:"",//sku里面的价格
				pricePlan:"",//价格方案
				rule: true,
				total:"",
				select: { //选择的商品规格参数
					keyName:"",//规格名
					
				},
				endTime:[],//拼团结束时间
				categories: [{
						name: "商品",
						id: 0
					},
					{
						name: "详情",
						id: 1
					},
					{
						name: "评论",
						id: 2
					}
				],
				categories3: [{
						name: "全部",
						id: 1,
						num: 0
					},
					{
						name: "好评",
						id: 2,
						num: 0
					},
					{
						name: "中评",
						id: 3,
						num: 0
					},
					{
						name: "差评",
						id: 4,
						num: 0
					},
					{
						name: "有图",
						id: 5,
						num: 0
					}
				],
				options:"",
				timer:null,
			}
		},
		components: {closeicon},
		computed: mapState(['hasLogin']),
		onLoad(options) {
			console.log(options)
			/*拼团信息*/
			if(options.prom_id){ //从商品详情过来
				this._getTreamInfo(options.prom_id)
			}else{
				this._getTreamInfo(options.team_id)
			}
			
			this.goods_id=options.goods_id;
			this.options=options
			
		},
		destroyed() {
			clearInterval(this.timer);
		},
		onShow(options) {
			/*重新获取登录状态*/
			
		
			if (this.hasLogin) {
				this._getGoodsFocus(this.goods_id)
				this.postVisit(this.goods_id)
			}
			// 获取是否是在审核一些功能
			if(configInfo.miniApp_is_audit==0){
				this.ishide=true;
			}else{
				this.ishide=false;
			}
		},
		methods: {
			tabClick(e) { //导航切换
				console.log(e.currentTarget.dataset.id)
				this.activeCategoryId = e.currentTarget.dataset.id
			},
			/*请求拼团信息*/
			_getTreamInfo(id) {
				getTreamInfo(id).then(res => {
					if (res) {
						this.treamInfo = res;
						this.getGoodsImg(res.goods_id);
						this.getGoodsInfo(res.goods_id);
						this.getStore(res.store_id);
						this.getGoodsAttr(res.goods_id);
						this._getCommentStatistics(res.goods_id);
						this.getSystemTime()
						this.countdown()
						
						/*拼团列表*/
						let found={
							"p":1,//默认2条
							"status":1,
							"team_id":res.team_id
						}
						this.getTreamFound(found)
						this._getPrice(this.goods_id)
					}
					console.log(res)
				})
			},
			/*请求商品信息*/
			getGoodsInfo(params) {
				getGoodsInfo(params).then(res => {
					console.log(res)
					if (res) {
						this.goodsInfo = res;
						this.goodsInfo.goods_content = res.goods_content.replace(/<img/gi, "<img style='width:100%'");
					}

				})
			},
			_getPrice(id){
				getPrice(id).then(res=>{
					console.log(res)
					if(res.length>0){
							this.pricePlan=res;
							this._getSpecification(this.goods_id);
							
					}else{
						var params={
							id:this.goods_id,
							isTeam:true,
							itemId:""
						}
						this.getSku(params)
					}
					
				})
			},
			_getSpecification(id){//获取规格先要判断 getPrice是否返回数据
				getSpecification(id).then(res=>{
					console.log(res)
					this.specification=res;
				})
			},
			// /*保留两位小数*/
			// filter(e){
			// 	let num=parseFloat(e).toFixed(2)
			// 	return num
			// },
			getSku(params){//获取规格参数
				getSku(params).then(res=>{
					console.log(res)
					/*规格有可能是0*/
					if(res){
					
						this.skuInfo=res;
						this.itemId=res.item_id;
						this.prom_type=res.prom_type
					
						var price = res.shop_price;
							price=price.toFixed(2)
						let priceArr = price.split(".");
						this.price = priceArr;
					}
					
				})
			},
			selectSpec(item,n,event,index){//选择规格
				var self=this;
				console.log(item)
				if (self.selectArr[n] != item) {
					self.selectArr[n] = item;
					self.subIndex[n] = index;
				} else {
					self.selectArr[n] = "";
					self.subIndex[n] = -1;
				}
				self.checkItem()
				
				// console.log(self.selectArr.length)
				var result1="";
				if(self.selectArr.length>1){
					var resultArr=[]
					this.selectArr.forEach((i,ind)=>{
						resultArr.push(JSON.stringify(i))
						resultArr=resultArr.reverse()
					})
					result1=resultArr.join("_")
				}else{
					// var result2=JSON.stringify(item)
					var resultArr=[]
					this.selectArr.forEach((i,ind)=>{
						resultArr.push(JSON.stringify(i))
					})
					result1=resultArr;
				}
				this.pricePlan.forEach((i,ind)=>{
						// console.log(i.key)
					if(i.key!=result1){//不相等 有可能是倒序了  
						var resultArr=[];
						resultArr=result1.toString().split("_");
						result1=resultArr.reverse();
						result1=result1.join("_")
					}	
					if(i.key==result1){
						
						console.log(result1)
						this.pricePlan.item_id=i.item_id;
						this.select.keyName=i.key_name;
						console.log("等于",ind)
						var params={
							id:this.goods_id,
							isTeam:true,
							itemId:this.pricePlan.item_id
						}
						this.getSku(params)
					}
				})
			},
			checkItem: function() {
				var self = this;
				var option = self.specification;
				var result = []; //定义数组存储被选中的值
				for (var i in option) {
					result[i] = self.selectArr[i] ? self.selectArr[i] : '';
				}
				for (var i in option) {
					var last = result[i]; //把选中的值存放到字符串last去
					for (var k in option[i].list) {
						result[i] = option[i].list[k].name; //赋值，存在直接覆盖，不存在往里面添加name值
						
					}
					
					result[i] = last; //还原，目的是记录点下去那个值，避免下一次执行循环时避免被覆盖
				}
			
				self.$forceUpdate(); //重绘
			},
			/*请求拼团人列*/
			getTreamFound(params){
				getTreamFound(params).then(res=>{
					console.log(res)
					if(res){
						this.total=res.total
						this.teamResult=this.teamResult.concat(res.records)
					}
				})
			},
			/*请求商品主体信息*/
			getGoodsAttr(params) {
				getGoodsAttr(params).then(res => {
					if (res) {
						this.goodsAttr = res;
					}
					console.log(res)
				})
			},
			/*添加商品浏览记录*/
			postVisit(params){
				postVisit(params).then(res=>{
					// console.log(res)
				})
			},
			/*请求店铺信息*/
			getStore(params) {
				getStore(params).then(res => {
					if (res) {
						this.stroeInfo = res;
					}
					console.log(res)
				})
			},
			/*请求商品主体图片*/
			getGoodsImg(params) {
				getGoodsImg(params).then(res => {
					console.log(res)
					if (res) {
						this.goods_img = res;
					}
				})
			},
			_getComments(id, type, p) { //商品评论数
				getComments(id, type, p).then(res => {
					console.log(res)
					if(res){
						let commentArr = []
						commentArr = res.records;
						// this.commentsList = commentArr;
						
						this.allTotal = res.total;
						let picArr = [];
						commentArr.forEach((i, index) => {
							console.log(i.img.split(","))
							picArr=i.img.split(",")
							
							i.commentsImg=picArr
						})
						this.allComments = this.allComments.concat(commentArr);
					}
					
				
				})
			},
			_getCommentStatistics(id) { //商品评论人数 百分比
				getCommentStatistics(id).then(res => {
					console.log(res)
					this.commentData = res;
					this.categories3[0].num = res.total_sum;
					this.categories3[1].num = res.high_sum;
					this.categories3[2].num = res.center_sum;
					this.categories3[3].num = res.low_sum;
					this.categories3[4].num = res.img_sum;

				})
			},
			onReachBottom() { //滚动加载
				if (this.activeCategoryId == 2) {
					if (this.allComments.length == this.allTotal) { //length=total显示文本信息
						// uni.showToast({
						//     title: '加载完了',
						//     duration: 2000
						// });
						this.nodata = true
						return false;
					}
					this.p++; //上拉加载每次加载10条
					this._getComments(this.goods_id, this.commentsType, this.p)
				}


			},
			
			/*打开规格弹窗*/
			openSpecModel(){
				this.openSpecModalActive=false
			},
			closeSpecModal(){
				this.openSpecModalActive=true
			},
			//关闭
			showRule() {
				this.rule = !this.rule;
			},
			addCartNum(){//数量
				if(this.goodsInputNum<this.skuInfo.store_count){ //小于库存
					this.goodsInputNum++
				}
				if(this.goodsInputNum>this.skuInfo.limit_num){
					this.goodsInputNum=this.skuInfo.limit_num
					let msg=`单次购买不能超过${this.skuInfo.limit_num}`
					common.toast("none",msg,2000)
					return 
				}
				
			},
			inputCartNum(){
				/*输入数>库存数 =库存数*/
				if(this.goodsInputNum>this.skuInfo.store_count&&this.goodsInputNum>this.skuInfo.limit_num){
					this.goodsInputNum=this.skuInfo.limit_num
					let msg=`单次购买不能超过${this.skuInfo.limit_num}`
					common.toast("none",msg,2000)
					return 
				}
				if(this.inputCartNum<=0){
					this.inputCartNum=1
				}
				
			},
			subCartNum(){ //减
				if(this.goodsInputNum>1){
					this.goodsInputNum--;
				}
			},
			tabClick(e) { //导航切换
				console.log(e.currentTarget.dataset.id)
				this.activeCategoryId = e.currentTarget.dataset.id
			},
			tabClick2(e) { // 导航栏切换
				this.activeNormsId = e.currentTarget.dataset.id
			},
			tabClick3(e) { //评论切换
				this.p=1;
				this.allComments.length=0
				this.commentsType = e.currentTarget.dataset.id;
				this._getComments(this.goods_id, this.commentsType, this.p)
			},
			tabComment() { //打开好评列表
				this.activeCategoryId = 2;
				this.allComments.length=0
				//打开好评列表时，窗口回到顶部
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 0
				});
				this._getComments(this.goods_id, this.commentsType, this.p)
			},
			/*查询商品是否收藏*/
			_getGoodsFocus(goodsId) {
				getGoodsFocus(goodsId).then(res => {
					console.log(res)
					if (res) {
						this.collectActive = false;
					}
				})
			},
			//点击取消添加收藏
			collectGoods() {
				if (this.hasLogin) {
					let goods_id = this.goods_id;
					if (this.collectActive == false) {

						this._delGoodsFocus(goods_id)
					} else {


						this._postGoodsFocus(goods_id)
					}
				} else {
					common.toast("none", "请重新登录", 2000)
					setTimeout(function() {
						common.islogin()
					}, 2000);
				}


			},
			/*商品取消收藏*/
			_delGoodsFocus(goodsId) {
				delGoodsFocus(goodsId).then(res => {
					console.log(res)
					if (res.status == 1) {
						this.collectActive = true
					}
				})
			},
			/*商品收藏*/
			_postGoodsFocus(goodsId) {
				postGoodsFocus(goodsId).then(res => {
					console.log(res)
					if (res.status == 1) {
						this.collectActive = false
					}
				})
			},
			countdown() {
				clearInterval(this.timer);
				this.timer = setInterval(this.createTime, 1000)
			
			},
			timeFormat(param) { //小于10的格式化函数
				return param < 10 ? '0' + param : param;
			},
			/*获取系统信息*/
			getSystemTime(){
				getSystemTime().then(res=>{
					console.log(res)
					this.startTime=res
					
				})
			},
			createTime() {
				// var startTime = parseInt(new Date().getTime() / 1000) 
				// this.getSystemTime()
				var startTime= this.startTime++;
				// console.log(startTime)
				var endtime=[]
				
				this.teamResult.forEach((i,index)=>{
					var foundTime = i.found_end_time;
					var difftime = parseInt(foundTime - startTime)
					
					var objTime;
					if (difftime > 0) {
								
						let hou = parseInt(difftime % (60 * 60 * 24) / 3600);
						let min = parseInt(difftime % (60 * 60 * 24) % 3600 / 60);
						let sec = parseInt(difftime % (60 * 60 * 24) % 3600 % 60);
						objTime = `${this.timeFormat(hou)}:${this.timeFormat(min)}:${this.timeFormat(sec)}`
					} else {
						objTime = `00:00:00`
					}
					endtime.push(objTime)
					console.log(objTime)
					// this.endTime = objTime
				})
				this.endTime=endtime;
				
			
				
			
			},
			/*回到顶部*/
			doScrollTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 300
				});
			},
			/*单独购买*/
			buyNormal(){
				let goods_id=this.goods_id;
				let item={
					goods_id:this.goods_id,
					"item_id":this.skuInfo.item_id ||this.options.item_id,
					"team_id":this.treamInfo.team_id
				}
				
				// let 
				uni.navigateTo({
					url:`/pages/goods/goodsInfo/goodsInfo?goods_id=${item.goods_id}&item_id=${item.item_id}&team_id=${item.team_id}`
				})
			},
			postTreamOrder(params){
				postTreamOrder(params).then(res=>{
					console.log(res)
					if(res.status==1){
						let order_sn=res.result.order_list[0].order_sn
						this.openSpecModalActive=true
						uni.navigateTo({
							url:`/pages/team/team_confirm/team_confirm?order=${order_sn}`
						})
					}
				})
			},
			
			/*发起拼团*/ 
			buyNow(){
				
				if (this.hasLogin) {
					var that=this;
					let params={
						"goods_id":that.goods_id,
						"goods_num":that.goodsInputNum,
						"item_id":that.skuInfo.item_id,
						"team_id":that.treamInfo.team_id
					}
					that.postTreamOrder(params)
				}else{
					common.islogin()
				}
				
			},
			/*预览图片*/ 
			previewCommentImgs(e){
				console.log(e)
				var cid=e.currentTarget.dataset.cidx;
				var index=e.currentTarget.dataset.index;
				var pic;
				this.allComments.forEach((i,index)=>{
					if(i.comment_id==cid){
						pic=i
					}
				})
				let arr=[]
				pic.commentsImg.forEach((i,index)=>{
					arr.push(this.hostUrl+i)
				})
				console.log(arr)
				uni.previewImage({
				      current: arr[index], /*是一个数组格式*/
				      urls: arr
				    });
				
			},
			/*查看更多*/ 
			catmore(){
				this.modalMask=true
			},
			clickMask(){
				this.modalMask=false
			},
			/*客服*/ 
			contactService(){
				var msg=`请联系客服:${this.stroeInfo.store_phone}`
				common.model(msg,false)
			},
		}
	}
</script>

<style lang="scss">
	.container {
		margin-bottom: 100rpx;
	}
	.spec-box{
		display: flex;
		flex-direction: column;
	}
	image {
		vertical-align: top;
	}

	.type-navbar {
		display: flex;
		justify-content: center;
		width: 100%;
		height: 80rpx;
		margin-bottom: 20rpx;
		background-color: #fff;
	}

	.type-box {
		width: 25%;
		box-sizing: border-box;
		font-size: 28rpx;
		line-height: 76rpx;
		padding: 0 20rpx;
		text-align: center;
		display: inline-block;
		overflow: hidden;
	}

	.type-navbar-item {
		border-bottom: 4rpx solid #fff;
	}

	.type-item-on {
		color: #ff3b3b;
		border-bottom: 4rpx solid #ff3b3b;
	}

	.swiper_box {
		width: 100%;
		height: 750rpx;
	}

	.goods-title {
		display: flex;
		justify-content: space-between;
		height: 108rpx;
	}

	.goods-name {
		width: 560rpx;
		height: 88rpx;
		margin: 10rpx 0;
		line-height: 44rpx;
		font-size: 30rpx;
		color: #333;
	}

	.goods-collect {
		width: 112rpx;
		padding-top: 30rpx;
	}

	.collect-img {
		width: 50rpx;
		height: 44rpx;
		margin: 0 auto;
		overflow: hidden;
	}

	.collect-des {
		text-align: center;
		font-size: 24rpx;
		color: #333;
	}

	.goods-price {
		font-size: 30rpx;
		padding: 20rpx 30rpx;
		line-height: 40rpx;
		color: #999;
		border-bottom: 1px solid #f3f3f3;
	}

	.prom-info {
		margin: 10rpx 0;
		color: #ff3b3b;
	}

	.prom-info>.prom-type {
		color: white;
		background-color: #ff3b3b;
		margin-right: 14rpx;
		padding: 2rpx 8rpx;
		border-radius: 4rpx;
	}

	.market-price {
		display: flex;
	}

	.market-price>view {
		text-decoration: line-through;
	}

	.goods-num {
		display: flex;
		justify-content: space-between;
	}

	.logistics-item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 90rpx;
		border-bottom: 1px solid #f3f3f3;
		font-size: 24rpx;
		color: #666;
	}

	.item-title {
		width: 180rpx;
	}

	.item-mes {
		color: #333;
		width: 420rpx;
		height: 90rpx;
		line-height: 90rpx;
	}

	.item-img {
		width: 32rpx;
		height: 32rpx;
	}

	.prom-item {
		color: #ff3b3b;
		border: 1px solid #ff3b3b;
		border-radius: 18rpx;
		line-height: 40rpx;
		height: 40rpx;
		padding: 2rpx 8rpx;
	}

	.guarantee {
		justify-content: flex-start;
	}

	.ico-item {
		width: 32rpx;
		height: 32rpx;
		margin-right: 10rpx;
	}

	.guarantee>view {
		display: flex;
		align-items: center;
		height: 32rpx;
		color: #666;
		width: 33.333333%;
	}

	.user-comment {
		margin: 10rpx 0;
		font-size: 28rpx;
	}

	.good-comment,
	.comment-num {
		display: flex;
	}

	.recommend {
		background-color: #fff;
		border-bottom: 1px solid #f3f3f3;
		padding-bottom: 20rpx;
	}

	.recommend-title {
		height: 70rpx;
		line-height: 70rpx;
		font-size: 28rpx;
		padding: 0 30rpx;
	}

	.recommend-ul {
		display: flex;
		justify-content: flex-start;
	}

	.recommend-ul .li {
		width: 25%;
		box-sizing: border-box;
		text-align: center;
		font-size: 28rpx;
		color: #333;
	}

	.shops-mes {
		position: relative;
		margin: 10rpx 0;
		padding: 20rpx 30rpx;
		background-color: #fff;
	}

	.shops-info {
		display: flex;
		height: 100rpx;
	}

	.shops-pic {
		width: 100rpx;
		height: 100rpx;
		margin-right: 20rpx;
		border: 1px solid #f3f3f3;
	}

	.shops-name {
		height: 100rpx;
		width: 420rpx;
		line-height: 50rpx;
		font-size: 30rpx;
	}

	.store-desc {
		font-size: 28rpx;
		color: #999999;
	}

	.scores-common {
		position: absolute;
		right: 30rpx;
		top: 80rpx;
		font-size: 28rpx;
		line-height: 1;
		color: #333;
	}

	.scores-list {
		display: flex;
		height: 120rpx;
		padding: 20rpx 0;
	}

	.scores-item {
		width: 33.333%;
		font-size: 28rpx;
		color: #666;
		text-align: center;
		line-height: 40rpx;
	}

	.scores-btns {
		height: 64rpx;
	}

	.scores-btns-item {
		float: left;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 330rpx;
		height: 60rpx;
		border: 1px solid #f3f3f3;
		font-size: 28rpx;
		color: #666;
	}

	.scores-btns-item:first-child {
		margin-right: 20rpx;
	}

	.scores-btns-pic {
		width: 40rpx;
		height: 37rpx;
		margin: 0 10rpx;
	}

	.li-img {
		width: 120rpx;
		height: 120rpx;
		margin: 0 auto;
	}

	.li-title {
		height: 58rpx;
		line-height: 30rpx;
		margin: 10rpx 0;
	}

	.comment-item {
		background-color: #fff;
		font-size: 28rpx;
		width: 710rpx;
		border-radius: 10rpx;
		margin: 0 auto;
		margin-bottom: 20rpx;
	}

	.comment-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 102rpx;
		margin: 0 30rpx;
		color: #333;
		border-bottom: 1px solid #f3f3f3;
	}

	.user-name {
		display: flex;
		align-items: center;
	}

	.user-pic {
		width: 54rpx;
		height: 54rpx;
		margin-right: 10rpx;
		border-radius: 50%;
		overflow: hidden;
	}

	.stars {
		float: left;
		display: flex;
		height: 42rpx;
		line-height: 42rpx;
		margin: 15rpx 0;
		width: 200rpx;
	}

	.star {
		width: 30rpx;
		height: 28rpx;
	}

	.state-spec {
		margin: 15rpx 0;
		float: right;
		font-size: 24rpx;
		color: #666;
		width: 460rpx;
		text-align: right;
	}

	.comment-cont {
		padding: 0 30rpx 30rpx;
		border-bottom: 1px solid #f3f3f3;
	}

	.comment-cont view {
		overflow: hidden;
	}

	.comment-mes {
		line-height: 42rpx;
	}

	.img-ul {
		display: flex;
		flex-wrap: wrap;
	}

	.img-li {
		width: 120rpx;
		height: 120rpx;
		margin: 8rpx;
	}

	.comment-btn {
		height: 60rpx;
		padding: 20rpx 30rpx;
	}

	.comment-btn .btn {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 60rpx;
		width: 45%;
		border: 1px solid #f3f3f3;
	}

	.comment-btn .btn-img {
		width: 30rpx;
		height: 28rpx;
		margin: 0 10rpx;
	}

	.reply-ul {
		margin-top: 20rpx;
	}

	.reply-li {
		color: #aaa;
	}

	.join-cart {
		position: fixed;
		left: 0;
		bottom: 0;
		display: flex;
		width: 100%;
		height: 100rpx;
		background-color: #fff;
		text-align: center;
	}

	.join-cart>view {
		width: 20%;
	}

	.join-cart>navigator {
		width: 20%;
	}

	.cart-ico {
		font-size: 24rpx;
		color: #333;
	}

	.shopping-cart {
		position: relative;
	}

	.cs-img {
		width: 45rpx;
		height: 40rpx;
		margin-top: 15rpx;
	}

	.sc-img {
		width: 42rpx;
		height: 40rpx;
		margin-top: 15rpx;
	}

	.cart-num {
		position: absolute;
		left: 50%;
		top: 0;
		width: 40rpx;
		height: 40rpx;
		line-height: 40rpx;
		text-align: center;
		border-radius: 50%;
		color: #fff;
		background-color: rgba(217, 81, 99, 0.9);
	}

	.cart-btn {
		font-size: 28rpx;
		color: #fff;
		padding: 16rpx 0;
		line-height: 34rpx;
	}

	.join-btn {
		background-color: #ff9c00;
	}

	.buy-btn {
		background-color: #ff3b3b;
	}

	view.cart-btn-lg {
		width: 50%;
	}

	.toTop {
		position: fixed;
		z-index: 3;
		right: 20rpx;
		bottom: 160rpx;
		width: 68rpx;
		height: 68rpx;
		border: 1px solid #f3f3f3;
		border-radius: 50%;
		overflow: hidden;
		cursor: pointer;
	}

	.comment-more {
		height: 56rpx;
		line-height: 56rpx;
		font-size: 26rpx;
		color: #999;
		text-align: center;
		background-color: #eee;
	}

	.goods-more {
		background-color: #fff;
	}

	/* 详情 */
	.goods-norms {
		background-color: #fff;
	}

	.type-navbar2 {
		display: flex;
		height: 72rpx;
		border-top: 1px solid #f3f3f3;
		border-bottom: 1px solid #f3f3f3;
	}

	.type-box2 {
		width: 50%;
		font-size: 26rpx;
		line-height: 72rpx;
		text-align: center;
		overflow: hidden;
	}

	.type-item2-on {
		color: #ff3b3b;
	}

	.parameter {
		padding: 40rpx 0;
	}

	.table {
		width: 698rpx;
		margin: 0 auto;
		border: 1px solid #f3f3f3;
		border-bottom: none;
	}

	.tb {
		width: 100%;
		min-height: 69rpx;
		line-height: 69rpx;
		border-bottom: 1px solid #f3f3f3;
		font-size: 28rpx;
		text-align: center;
		color: #333;
	}

	.th-thitle {
		font-weight: bold;
		background-color: #f5fafe;
	}

	.td-cont {
		display: flex;
	}

	.td-title {
		width: 259rpx;
		background-color: #f5fafe;
		border-right: 1px solid #f3f3f3;
	}

	.td-text {
		width: 439rpx;
	}

	/* 评论 */
	.goods-comment {}

	.type-navbar3 {
		display: flex;
		height: 88rpx;
		border-top: 1px solid #ddd;
		border-bottom: 1px solid #f3f3f3;
		background: #fff;
		margin-bottom: 20rpx;
	}

	.type-box3 {
		background: #fff;
		font-size: 24rpx;
		line-height: 44rpx;
		height: 44rpx;
		overflow: hidden;
		border-radius: 6rpx;
		border: 1px solid #ff3b3b;
		color: #333;
		margin: 20rpx 10rpx;
	}

	.type-box3 view {
		padding: 0 10rpx;
	}

	.type-item3-on {
		background: #ff3b3b;
		color: #fff;
	}

	/* 规格弹框 */
	.spec-model {
		position: fixed;
		bottom: 0;
		z-index: 20;
		background: white;
		width: 100%;
		padding: 0 30rpx;
		font-size: 32rpx;
		box-sizing: border-box;
		overflow-x: hidden;
	}

	.spec-goods {
		padding: 15rpx 0 30rpx;
		float: left;
		width: 100%;
		border-bottom: 1px solid #f3f3f3;
	}

	.spec-img {
		float: left;
		height: 150rpx;
		width: 150rpx;
		margin-top: 16rpx;
	}

	.spec-goods-info {
		float: left;
		padding: 0 25rpx;
		width: 490rpx;
	}

	.spec-goods-name {
		font-size: 30rpx;
		line-height: 35rpx;
		max-height: 70rpx;
		margin: 15rpx 20rpx 20rpx 0;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.spec-goods-price {
		color: #ff3b3b;
		font-size: 30rpx;
		font-weight: bold;
	}

	.spec-goods-stock {
		margin-top: 10rpx;
		font-size: 26rpx;
		color: #999999;
	}

	.spec-name {
		clear: both;
		padding: 20rpx 0;
		font-size: 30rpx;
	}

	.count {
		width: 184rpx;
		height: 50rpx;
		border: 1rpx solid #f3f3f3;
		font-size: 28rpx;
	}

	.count>view,
	.count>input {
		float: left;
		width: 60rpx;
		height: 50rpx;
		line-height: 50rpx;
		text-align: center;
	}

	.sub {
		border-right: 1px solid #f3f3f3;
	}

	.add {
		border-left: 1px solid #f3f3f3;
	}

	.spec-btn {
		color: black;
		background-color: white;
		padding: 10rpx 10rpx;
		font-size: 26rpx;
		line-height: 28rpx;
		float: left;
		border: 1rpx solid #f3f3f3;
		margin: 4rpx 10rpx 4rpx 0;
		border-radius: 4rpx;
	}

	.spec-btn-click {
		color: white;
		background-color: #ff3b3b;
		border: 1rpx solid #ff3b3b;
	}

	.spec-cart-btn {
		margin: 30rpx 0 0 -30rpx;
		padding: 30rpx;
		width: 100%;
		font-size: 30rpx;
		text-align: center;
		color: #fff;
		background-color: #ff3b3b;
	}

	.spec-add-cart {
		background-color: #ffb03f;
	}

	.spec-buy {
		background-color: #ff3b3b;
		margin-left: 34rpx;
	}

	.spec-cart-disable {
		background: #bbbbbb;
	}

	.spec-cart-btn-lg {
		width: 614rpx;
	}

	/* 优惠信息弹框 */
	.prom-model {
		position: fixed;
		bottom: 0;
		z-index: 20;
		background: white;
		width: 100%;
		padding: 0 30rpx 30rpx;
		font-size: 32rpx;
		box-sizing: border-box;
		overflow-x: hidden;
	}

	.prom-model .prom-title {
		text-align: center;
		margin: 30rpx 0;
	}

	.prom-model .logistics-item {
		border: 0;
	}

	.prom-model .item-mes {
		width: 500rpx;
	}

	/*拼团新增的*/
	.pt-goods {
		background-color: #fff;
	}

	.pt-goods-name {
		height: 102rpx;
		line-height: 102rpx;
		padding: 0 30rpx;
		font-size: 30rpx;
		color: #333;
	}

	.pt-tips {
		display: flex;
		height: 80rpx;
		line-height: 80rpx;
		padding-left: 30rpx;
	}

	.pt-tips .co-red {
		font-size: 36rpx;
		font-weight: bold;
	}

	.pt-tips .pt-btn {
		width: 100rpx;
		height: 56rpx;
		margin-left: 20rpx;
		text-align: center;
		color: #fff;
		font-size: 24rpx;
		background-color: #ff3b3b;
		border-radius: 10rpx;
		line-height: 60rpx;
		margin-top: 10rpx;
	}

	.pt-price {
		line-height: 80rpx;
		font-size: 24rpx;
		color: #666;
		padding-left: 30rpx;
	}

	.pt-price>text {
		text-decoration: line-through;
		margin-left: 20rpx;
	}

	.pt-des {
		padding: 0 30rpx 20rpx;
		font-size: 30rpx;
		line-height: 60rpx;
		color: #999;
		border-bottom: 1px solid #f3f3f3;
	}

	.pt-icos {
		display: flex;
		height: 28rpx;
		line-height: 28rpx;
		padding: 30rpx 0;
	}

	.pt-icos.pt-icos>view {
		width: 33.33%;
		font-size: 24rpx;
		color: #333;
		text-align: center;
	}

	.pt-icos image {
		width: 32rpx;
		height: 28rpx;
	}

	.pt-rule {
		margin-top: 20rpx;
		background-color: #fff;
	}

	.pt-rule-name {
		padding-left: 30rpx;
		font-size: 30rpx;
		line-height: 112rpx;
		color: #666;
	}

	.pt-rule-list {
		display: flex;
	}

	.pt-rule-list>view {
		width: 25%;
		line-height: 100rpx;
		text-align: center;
		color: #999;
		font-size: 26rpx;
	}

	.pt-rule-num {
		margin: 0 auto;
		width: 100rpx;
		height: 100rpx;
		font-size: 36rpx;
		border: 1px dashed #999;
		border-radius: 50%;
	}

	.pt-ico5 {
		height: 48rpx;
		text-align: center;
	}

	.pt-ico5 image {
		width: 64rpx;
		height: 48rpx;
	}

	.transform image {
		transform: rotate(-180deg)
	}

	.pt-rule-cont {
		padding: 20rpx 30rpx 0;
		background-color: #fdfbe4;
		font-size: 30rpx;
		line-height: 42rpx;
		color: #666;
	}

	.pt-rule-cont>view {
		margin-bottom: 20rpx;
	}

	.spec-wrap {
		overflow: hidden;
	}

	.pt-order-tips {
		line-height: 80rpx;
		padding-left: 30rpx;
		font-size: 24rpx;
		color: #999;
	}

	.more::after {
		content: "";
		display: inline-block;
		width: 16rpx;
		height: 16rpx;
		border-top: 2rpx solid #999;
		border-right: 2rpx solid #999;
		transform: rotate(45deg);
	}

	.pt-order-list {
		background-color: #fff;
		overflow: hidden;
	}

	.pt-order-item {
		display: flex;
		justify-content: space-between;
		border-bottom: 2rpx solid #f3f3f3;
		padding: 0 30rpx;
	}

	.pt-order-cont {
		position: relative;
		display: flex;
		justify-content: space-between;
		height: 80rpx;
		padding: 16rpx 0 16rpx 0;
		width: 560rpx;
		font-size: 24rpx;
		line-height: 32rpx;
		color: #999;
	}

	.co-333 {
		color: #333;
	}

	.pt-user {
		width: 180rpx;
		position: relative;
	}

	.pt-user image {
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
	}

	.pt-user .name {
		position: absolute;
		left: 100rpx;
		top: 20rpx;
		width: 250rpx;
	}

	.pt-time {
		width: 190rpx;
		margin-top: 12rpx;
	}

	.pt-order-btn {
		width: 120rpx;
		height: 50rpx;
		line-height: 50rpx;
		background-color: #ff3b3b;
		color: #fff;
		text-align: center;
		font-size: 24rpx;
		margin-top: 30rpx;
	}

	.pt-store {
		display: flex;
		justify-content: space-between;
		margin-top: 20rpx;
		padding: 20rpx 30rpx;
		background-color: #fff;
	}

	.pt-store-des {
		display: flex;
		width: 400rpx;
	}

	.pt-store-des>image {
		width: 100rpx;
		height: 100rpx;
		margin-right: 20rpx;
	}

	.pt-store-cont {
		padding-top: 12rpx;
		width: 280rpx;
		font-size: 30rpx;
		color: #666;
		line-height: 36rpx;
	}

	.pt-store navigator {
		width: 200rpx;
		padding: 10rpx 0;
		margin-top: 20rpx;
		line-height: 40rpx;
		height: 40rpx;
		text-align: center;
		box-shadow: 0 0 10rpx rgba(0, 0, 0, .3);
		font-size: 24rpx;
		border-radius: 10rpx;
		color: #ff3b3b;
		border: 1rpx solid #ff3b3b;
	}

	.pt-store navigator>image {
		width: 40rpx;
		height: 37rpx;
	}

	/* 商品海报分享*/

	.share-btn {
		display: inline-block;
		margin-top: 12rpx;
		margin-left: 12rpx;
		height: 50rpx;
		width: 50rpx;
	}

	.share-btn image {
		width: 100%;
		height: 100%;
	}

	.share-save-btns {
		background-color: #fff;
		width: 100%;
		line-height: 80rpx;
	}

	.share-save-btn {
		width: 80%;
		height: 80rpx;
		text-align: center;
		margin: 0px auto;
		background-color: #ff3b3b;
		color: #fff;
		border-radius: 10rpx;
	}

	.share-pic {
		width: 270rpx;
		height: 480rpx;
		margin: 20rpx auto;
		background-color: #999;
		box-shadow: 0rpx 5rpx 5rpx 5rpx #cccccc
	}

	.share-tips {
		font-size: 9pt;
		color: #999;
		display: block;
		margin-top: 10rpx;
		width: 100%;
		text-align: center;
	}

	.just {
		justify-content: space-between;
		border-bottom: 2rpx solid #f3f3f3;
	}

	.flex {
		display: flex;
	}

	.just .pt-order-tips:last-child {
		padding-right: 30rpx;
	}

	.just .pt-order-tips:first-child {
		color: #333;
	}

	/** 查看更多start **/
	.modal-image image {
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
		margin-top: 20rpx;
	}

	.modal-mask {
		position: fixed;
		z-index: 99999;
		background-color: rgba(0, 0, 0, 0.6);
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
	}

	.modal-content {
		width: 600rpx;
		height: 750rpx;
		position: absolute;
		top: 50%;
		left: 50%;
		border-radius: 16rpx;
		background-color: #fff;
		transform: translate(-50%, -50%);
	}

	.modal-content .modal-title {
		width: 100%;
		height: 94rpx;
		border-bottom: 1rpx solid #f3f3f3;
		text-align: center;
		line-height: 94rpx;
		font-size: 34rpx;
	}

	.modal-content .modal-close {
		position: 50rpx;
		width: 50rpx;
		height: 50rpx;
		border-radius: 50%;
		top: -20rpx;
		right: -18rpx;
		background: #dedede;
	}

	.modal-content .modal-close image {
		width: 28rpx;
		height: 28rpx;
		border-radius: 50%;
		background: #dedede;
		margin-left: 12rpx;
		margin-top: 12rpx;
	}

	.modal-list {
		padding: 0 30rpx;
		height: 656rpx;
		overflow-x: hidden;
		overflow-y: scroll;
	}

	.modal-list .modal-list-content {
		width: 100%;
		overflow: hidden;
		font-size: 28rpx;
		position: relative;
	}

	.modal-list .modal-list-content .modal-image {
		width: 540rpx;
		height: 120rpx;
		position: relative;
		border-bottom: 2rpx solid #f3f3f3;
	}

	.modal-list-content .max {
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		color: #999;
		font-size: 22rpx;
	}

	.modal-list .modal-list-content .modal-info {
		float: left;
		height: 104rpx;
		line-height: 47rpx;
		text-align: left;
		margin-left: 28rpx;
		position: absolute;
		top: 16rpx;
		left: 90rpx;
		width: 300rpx;
	}

	.modal-info .modal-person {
		height: 40rpx;
	}

	.modal-info .modal-person text:nth-child(1) {
		display: inline-block;
		max-width: 190rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.modal-info .modal-person text:nth-child(2) {
		font-size: 22rpx;
		color: #666;
		margin-left: 16rpx;
		position: absolute;
	}

	.modal-info .modal-time {
		font-size: 22rpx;
		color: #999;
	}

	.modal-list .modal-list-content .modal-btn {
		width: 110rpx;
		height: 50rpx;
		line-height: 50rpx;
		background-color: #ff3b3b;
		color: #fff;
		text-align: center;
		font-size: 24rpx;
		position: absolute;
		right: 0;
		top: 35rpx;
	}

	.modal-list .modal-list-content .modal-info .modal-time {
		width: 270rpx;
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}

	/** 查看更多end **/
</style>
